<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
 ! Excerpted from "Prototype and script.aculo.us",
 ! published by The Pragmatic Bookshelf.
 ! Copyrights apply to this code. It may not be used to create training material, 
 ! courses, books, articles, and the like. Contact us if you are in doubt.
 ! We make no guarantees that this code is fit for any purpose. 
 ! Visit http://www.pragmaticprogrammer.com/titles/cppsu for more book information.
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Drag it up!</title>
  <link rel="stylesheet" type="text/css" href="geometry.css" />
  <script type="text/javascript" src="prototype.js"></script>
  <script type="text/javascript"
   src="scriptaculous.js?load=effects,dragdrop"></script>
  <script type="text/javascript" src="geometry.js"></script>
</head>
<body>
  <h1>Drag it up!</h1>
<%
LABELS.each_with_index do |labels, index|
  pos = $geometry[index]
  style = "top: #{pos[:top]}px; left: #{pos[:left]}px; "
  style += "z-index: #{pos[:zIndex]};"
%>
<div id="win<%= index %>" class="widget" style="<%= style %>">
  <h2><%= labels[:title] %></h2>
  <% labels[:text].each_line do |line| %>
  <p><%= line %></p>
  <% end %>
</div>
<% end %>
</body>
</html>
